﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ARR.Entities.ComponentModel;
using ARR.Entities.Validation.Common;
using ARR.Shared;
using ARR.Entities.Validation.ComponentModel;

namespace ARR.Entities.Validation
{
    [Serializable]
    public class CountryInputValidations : InputValidationBase
    {
        private Country country;

        public CountryInputValidations(Country country)
        {
            this.country = country;
        }

        public override List<ValidationBase> CreateValidations()
        {
            List<ValidationBase> inputValidations = new List<ValidationBase>();
            
            inputValidations.Add(new Required("Code", Labels.Codigo));
            inputValidations.Add(new StringLength("Code", 50, Labels.Codigo));

            inputValidations.Add(new Required("Name", Labels.Nombre));
            inputValidations.Add(new StringLength("Name", 200, Labels.Nombre));

            inputValidations.Add(new Required("CurrencyName", Labels.Moneda));
            inputValidations.Add(new StringLength("CurrencyName", 50, Labels.Moneda));

            inputValidations.Add(new Required("CurrencyISOCode", Labels.CodigoISOMoneda));
            inputValidations.Add(new StringLength("CurrencyISOCode", 10, Labels.CodigoISOMoneda));


            return inputValidations;
        }
    }
}
